package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户角色表
 * @TableName user_role
 */

@Schema(description = "用户角色关系信息")
@TableName(value ="user_role")
@EqualsAndHashCode(callSuper = true)
@Data
public class UserRole extends BaseEntity implements Serializable {
    public UserRole(Long uid, Long rid){
        this.uid=uid;
        this.rid=rid;
    }
    public UserRole(){}

    @Schema(description = "用户id")
    private Long uid;

    @Schema(description = "角色id")
    private Long rid;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}